<?php

 class session_manage {
    public function __set($name, $value) {
        $_SESSION[$name] = $value ;
    }
 }

class Magic_Session_Lib {
    protected $session ; 
    protected static $int;
    public static function callMethod(){
        self::$int = new self ;
        return self::$int;
               
    }
    public function __construct() {
      $this->session = new session_manage;
      return $this->session ;
    }
    public function _setSession($name,$value){
        $this->session->$name = $value ;
    }
    public function _getSession($name){
        if(isset($_SESSION[$name])){
            return $_SESSION[$name];
        } else {
            return 'null';
        }
    }
    public function _unsetSession($name){
       if(isset($_SESSION[$name]) && !empty($_SESSION[$name])){
            unset($_SESSION[$name]);
        }
    }
}

?>
   